<template>
  <!-- 
  头部处理需求:
  1.自定义背景颜色
  2.自定义文字颜色
  3.自定义文本内容


 -->
  <div class="my-header" :style="{ backgroundColor:background, color:color,content:content}">购物车-----------天猫3.12植树节活动-----------------</div>
</template>

<script>
export default {
  props: {
    background: {
      type: String,
      default: "#1d7bff",
    },
    color: {
      type: String,
      default: "#fff",
    },
    content: {
      type: String,
      default: "demo标题",
    },
  },
};
</script>

<style lang="less" scoped>
.my-header {
  height: 45px;
  line-height: 45px;
  text-align: left;
  background-color: #1d7bff;
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  font-weight: 700px;
}
</style>